<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

session_start();
require("../models/webconfig.php");
require("../models/class.connection.php");
require("../models/repositories/class.CartRepository.php");

$cartRepository = new CartRepository();
if (isset($_POST['code'])) {
    $id=$_POST['code'];
    $cartRepository->DeleteItem($id);
    echo($cartRepository->GetCartCount());
}
?>
